package com.snowher.play.entity;

import java.io.Serializable;

public class BaseResult<T> implements Serializable {
    private boolean isSuccess;
    private T data;
    private int errorCode;

    public BaseResult() {
    }

    public BaseResult(boolean isSuccess, T data, int errorCode) {
        this.isSuccess = isSuccess;
        this.data = data;
        this.errorCode = errorCode;
    }

    public boolean isSuccess() {
        return isSuccess;
    }

    public void setSuccess(boolean success) {
        isSuccess = success;
    }

    public Object getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }
}
